home *** CD-ROM | disk | FTP | other *** search
- Path: access4.digex.net!not-for-mail
- From: ell@access4.digex.net (Ell)
- Newsgroups: comp.lang.c++
- Subject: [Q] Interface vs. Implementation Inheritance
- Date: 7 Feb 1996 05:20:25 GMT
- Organization: The Universe
- Message-ID: <4f9cqp$2gc@news4.digex.net>
- NNTP-Posting-Host: access4.digex.net
- X-Newsreader: TIN [UNIX 1.3 950824BETA PL0]
-
- From news3.digex.net!access1.digex.net!not-for-mail Wed Feb 7 00:04:07 1996
- Path: news3.digex.net!access1.digex.net!not-for-mail
- From: ell@access1.digex.net (Ell)
- Newsgroups: comp.object
- Subject: Re: [Q] Interface vs. Implementation Inheritance
- Date: 6 Feb 1996 03:40:30 GMT
- Organization: The Universe
- Lines: 37
- Message-ID: <4f6ije$hcg@news4.digex.net>
- References: <4etus7$t6f@ixnews2.ix.netcom.com> <qcwraw9vj05.fsf@grasshopper.aud.alcatel.com> <4f6di0$ge7@news4.digex.net>
- NNTP-Posting-Host: access1.digex.net
- X-Newsreader: TIN [UNIX 1.3 950824BETA PL0]
-
- Ell (ell@access1.digex.net) wrote:
- : Kevin K. Lewis (lewikk@grasshopper.aud.alcatel.com) wrote:
- : : In article <4etus7$t6f@ixnews2.ix.netcom.com> gregz@ix.netcom.com
- : : (Greg Zavertnik) writes:
- : :
- : : Hello,
- : :
- : : I've been hearing about interface vs. implementation inheritance and
- : : have a few questions about them.
- : : [...]
- : :
- : : I'm assuming by "interface inheritance", you mean subtyping. If not,
- : : please correct me.
- :
- : With respect to C++ public inheritance, think more about
- : "substitutability" rather than subtyping, as the C++ FAQ and my article
- : "Beauty and Power of C++" advocate. (The article is in the May 1995 issue
- : of Object magazine. I am Elliott Coates.) This idea was initially put
- : forward by myself in 1990, and extended by contributors to comp.lang.c++.
- : Objects which publically inherit should be substitutable for each other in
- : C++. To do so they should adhere to Bertrand Meyer's open/closed
- : principle and Barbara Liskov's substitution principle.
- :
- : Elliott
-
- Liskov argued for substitution compliance of derived classes in a class
- hierarchy (a derived class should be substitutable for its base class).
- In comp.lang.c++, I argued that such substitution is more important than
- "is-a" subtyping with respect to public inheritance. I made the point
- that it less important to subtype than it is to achieve run-time
- substitution of the parts of a system on both a micro (class) and macro
- (subsystem/category) level in a consistent manner. If the
- classes/categories are open/closed and LSP compliant then they should be
- consistent for substitution in terms of the logical responsibility
- collaboration structure of the program.
-
- Elliott
-
-